1. Technical Field of the Invention
This invention relates generally to communication systems and more particularly to encoding/decoding and scrambling/descrambling of data within such communication systems.
2. Description of Related Art
Communication systems are known to transport large amounts of data between a plurality of end user devices. Such end user devices include telephones, facsimile machines, computers, television sets, cellular phones, personal digital assistants, et cetera. As is also known, such communication systems may be local area networks (LAN) and/or wide area networks (WAN). A local area network is generally understood to be a network that interconnects a plurality of end user devices distributed over a localized area (e.g., up to a radius of 10 kilometers). For example, a local area network may be used to interconnect workstations distributed within an office of a single building or a group of buildings, to interconnect Internet computer based equipment distributed around a factory or hospital, et cetera.
A wide area network is generally understood to be a network that covers a wide geographic area. Wide area networks include both public data networks and enterprise wide private data networks. A public data network is established and operated by a national network administrator specifically for data transmission. Such public data networks facilitate the interworkings of equipment from different manufacturers. Accordingly, standards by the ITU-T have been established for conveying data within public data networks. Currently, there are two main types of public data networks: packet switched public data networks and circuit switched public data networks. For example, the public switched telephone network is a circuit switched public data network while the Internet is a packet switched public data network. Other examples of wide area networks include integrated service digital networks (ISDN) and broadband multi-service networks.
As is further known, communication systems may be networked together to yield larger communication systems, where such networking is typically referred to as internetworking. Internetworking is achieved via internetworking units that allow communication networks using the same or different protocols to be linked together. The internetworking units may be routers, gateways, protocol converters, bridges, and/or switches.
Regardless of the type of communication system (e.g., LAN, WAN, internetworking LAN and/or WAN), each communication system employs a data conveyance protocol to ensure that data is accurately conveyed within the system. All such data conveyance protocols are based on layers 1, 2, 3, and/or 4 of the open system interconnection (OSI) seven layer reference model. As is known, the layers include a physical layer (layer 1), a data link layer (layer 2), a network layer (layer 3), a transport layer (layer 4), a session layer (layer 5), a presentation layer (layer 6), and an application layer (layer 7).
In general, a protocol is a formal set of rules and conventions that govern how each end user device and/or data terminal equipment (i.e., the infrastructure equipment of the communication system) exchanges information within the communication system. A wide variety of protocols exist, but can generally be categorized in the one of four types of protocols: a local area network protocol, a wide area network protocol, a routing protocol, or a network protocol. Local area network protocols operate at the physical and data link layers and define communication over various local area network and media. Wide area network protocols operate at the lowest three layers of the OSI model and define communication over the various wide area media. Routing protocols are network layer protocols that are responsible for path determination and traffic switching. Network protocols are the various upper layer protocols that exist in a given protocol suite. Examples of such protocols include asynchronous transfer mode (ATM), frame relay, TCP/IP, Ethernet, et cetera. Typically, such protocols include an encoding/decoding and/or scrambling/descrambling scheme. As is known, an encoding/decoding scheme enhances the reliability of data conveyances by encoding and/or scrambling data to include extra bits with the data to produce a code word. When the code word is received by the corresponding decoder and/or descrambler, it utilizes the extra bits to determine if the data was received without error. If the data was received without error, the decoder and/or descrambler uses the extra bits to determine and subsequently correct the error.
One such coding scheme is 64b/66b, which takes 64 bits of data and produces a 66-bit code word. In addition, the 66-bit code word is scrambled to produce a scrambled 66-bit code word. The scrambled 66-bit code word includes a 2-bit sync-header and 64 bits of scrambled encoded data. An issue arises in transmitting and subsequently receiving the scrambled 66-bit code word in that most data buses are 32-bits wide. Thus, every 2 cycles, there are 2 bits leftover, which need to be transmitted during the 3rd cycle.
The current solution to resolve this issue is to use a barrel shifter gearbox. While the barrel shifter works, it is very large with respect to die area and consumes a significant amount of power. For instance, a barrel shifter for a 32-bit bus requires 16×66 registers to store and transfer the scrambled 66-bit code words. The 66 value corresponds to the number of bits in a scrambled code word and the 16 value corresponds to the pattern of the 2 leftover bits repeating every 16 cycles (e.g., 32 bit bus divided by 2 extra bits).
Therefore, a need exists for a method and apparatus for framing code words without the need for a barrel shifter.